1. Field of the Invention
The present invention relates to a compression/expansion circuit to perform compression or expansion of image data by a JBIG method.
2. Related Background Art
Several methods are proposed as methods of compression or expanding image data. Among them, the compressing/expanding method called a JBIG method is a compressing/expanding method in which a standardizing work is being progressed by a JBIG (Joint Bi-level Image Group) separated from a JPEG (Joint Photographic Experts Group).
The above method has been disclosed in detail in the magazine of The Society of Japan Image Electronics, Vol. 20, No. 1, pages 41 to 49, 1990. The compressing/expanding method of the JBIG method will now be briefly explained.
In case of compressing image data of (4.times.4) pixels as shown in FIG. 21, for instance, image data A.sub.1 to A.sub.16 of (4.times.4) pixels of, e g., 400 dpi are compressed into image data B.sub.1 to B.sub.4 of 200 dpi. Differences between the compressed image data B.sub.1 to B.sub.4, and the original image data A.sub.1 to A.sub.16, are encoded. The compressed image data are newly set to image data A.sub.1 to A.sub.16 as targets to be compressed and the compressing and encoding processes are again executed.
As mentioned above, the original image data is compressed into the image data of the lowest resolution of about 12.5 dpi. The image data of the lowest resolution is used together with the encoded data for communication, preservation or storage. On the other hand, in case of expanding the image data of the lowest resolution, the image data of a resolution (25 dpi), which is higher by one rank, is formed by using the image data of the lowest resolution (12.5 dpi), and its encoded data. In a manner similar to that described above, by sequentially forming the image data of a higher resolution, the image data of the low resolution is expanded to the original image data of 400 dpi.
According to the JBIG method, when compressed image data is formed, namely, in the example of FIG. 21 in case of forming the compressed image data at the pixel position of B.sub.4, the high resolution image data at the pixel positions A.sub.6 to A.sub.8, A.sub.10 to A.sub.12, and A.sub.14 to A.sub.16 in a region surrounded by a bold line in FIG. 21 and the image data of B.sub.1 to B.sub.3 which have already been compressed are substituted into a weighting arithmetic operating expression and the compressed image data at the pixel position of B.sub.4 is determined.
Although the image data at a reference pixel position is also used as data which is used in the encoding, the reference pixel positions near the position of a target pixel to be encoded and the number of reference pixel positions can be variably set in accordance with the contents of the image data at the pixel positions.
FIG. 22 shows a circuit to compress the image data of 400 dpi into the image data of 12.5 dpi by using such an algorithm as mentioned above.
In FIG. 22, the image data of one picture plane of 400 dpi, which has been stored in a frame memory 118, is compressed into the image data of 200 dpi by a reduction circuit 119 on the basis of the foregoing arithmetic operating method. The compressed image data of 200 dpi is temporarily stored into a frame memory 120. After that, the image data of the lowest resolution is formed in a multistage manner by a plurality of reduction circuits 121 and frame memories 122.
An encoder 125 performs an encoding for 200 dpi by using image data of 400 dpi and the image data of 200 dpi after it was compressed. An encoder 124 executes the encoding for 100 dpi by using image data of 200 dpi and image data of 100 dpi. In a manner similar to the above, encoded data corresponding to the compressed image data is formed by an encoder (not shown) every stage.
In case of expansions the image data of the lowest resolution and the encoded data which have been stored in the frame memories are supplied to an expansion device and the image data of a resolution which is higher by one rank is decoded by a processing procedure opposite to the above. Subsequently, the image data of a resolution which is higher by one rank is formed at multistage by using the image data and the encoded data.
In the compression/expansion circuit of the JBIG method, it is necessary to execute the compressing and/or expanding processes in a multistage (hierarchy) manner, so that the compression/expansion circuits need to be serially connected. There are, consequently, drawbacks such that the number of parts is large and a circuit construction is complicated and the apparatus is very expensive.